package com.gitee.zzh.codegenerator;

import com.gitee.zzh.common.StrUtil;

public class ParamInfo {
    private String projectPath;
    private String cnt;
    private String packages;
    private String commonPackages;
    private String tableName;
    private String txtEntityName;
    private String txtEntityFieldName;
    private CustomCode customCode;
    private String tableRemarks;

    public String getProjectPath() {
        return projectPath;
    }

    public void setProjectPath(String projectPath) {
        this.projectPath = projectPath;
        this.packages = StrUtil.getBasePackage(projectPath);
    }

    public void setCorePath(String corePath) {
        this.commonPackages = StrUtil.getBasePackage(corePath);
    }

    public String getTableName() {
        return tableName;
    }
    public void setTableName(String tableName) {
        this.tableName = tableName;
        this.txtEntityName = StrUtil.unlineToPascal(tableName, Integer.parseInt(cnt));
        this.txtEntityFieldName = this.txtEntityName.substring(0, 1).toLowerCase() + this.txtEntityName.substring(1);
    }

    public void setCnt(String cnt) {
        this.cnt = cnt;
    }

    public String getPackages() {
        return packages;
    }

    public void setPackages(String packages) {
        this.packages = packages;
    }

    public String getCommonPackages() {
        return commonPackages;
    }

    public void setCommonPackages(String commonPackages) {
        this.commonPackages = commonPackages;
    }

    public String getTxtEntityName() {
        return txtEntityName;
    }

    public void setTxtEntityName(String txtEntityName) {
        this.txtEntityName = txtEntityName;
    }

    public String getTxtEntityFieldName() {
        return txtEntityFieldName;
    }

    public CustomCode getCustomCode() {
        return customCode;
    }

    public void setCustomCode(CustomCode customCode) {
        this.customCode = customCode;
    }

    public String getTableRemarks() {
        return tableRemarks;
    }

    public void setTableRemarks(String tableRemarks) {
        this.tableRemarks = tableRemarks;
    }
}
